Creating bokeh figures in a notebook

First import the modules you'll need.


In [ ]:
from bokeh.charts import Histogram
from bokeh.plotting import figure, output_notebook, show
from numpy.random import poisson

Now create some random data.


In [ ]:
data = poisson(5, 10000)

Instruct bokeh to output to the notebook


In [ ]:
output_notebook()

Create a figure


In [ ]:
fig = figure(title="plotting MADNESS!!!1!", x_axis_label='x', y_axis_label='y')

Histogram that data, yo!


In [ ]:
hist = Histogram(data, bins=14, legend=True)

Finally, display it.


In [ ]:
show(hist)